#include<iostream>
#include<stdio.h>
#include<cmath>
using namespace std;
double shi(double a,double b)//x,n
{
    double all = 0;
    for(int i = 0;i<b;i++)
    {   
        a= a*i;
        all+=a;



    }


return all;


}


int main()
{
double a = 0;
double b = 0;
scanf("%lf %lf",&a,&b);
printf("%.2lf",shi(a,b));





    return 0;
}